﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bdcs.Core.Entity
{
    /// <summary>
    /// ZIptGPS1数据模型对象
    /// </summary>
    [Serializable]
    public partial class ZIptGPS1Mod
    {
        /// <summary>
        /// 初始化ZIptGPS1数据模型对象
        /// </summary>
        public ZIptGPS1Mod()
        {
            
        }
        /// <summary>
        /// 初始化ZIptGPS1数据模型对象并给所有字段赋值
        /// </summary>
        /// <param name="direction">Direction</param>
        /// <param name="lat">Lat</param>
        /// <param name="lon">Lon</param>
        /// <param name="speed">Speed</param>
        /// <param name="time">Time</param>
        /// <param name="type">Type</param>
        /// <param name="file">file</param>
        public ZIptGPS1Mod(double? direction,double? lat,double? lon,double? speed,double? time,string type,string file)
        {
            //给Direction字段赋值
            this.Direction = direction;
            //给Lat字段赋值
            this.Lat = lat;
            //给Lon字段赋值
            this.Lon = lon;
            //给Speed字段赋值
            this.Speed = speed;
            //给Time字段赋值
            this.Time = time;
            //给Type字段赋值
            this.Type = type;
            //给file字段赋值
            this.File = file;
        }
        
		//属性存储数据的变量
        private double? _direction;
        private double? _lat;
        private double? _lon;
        private double? _speed;
        private double? _time;
        private string _type;
        private string _file;
        
        /// <summary>
        /// Direction
        /// </summary>
        public double? Direction
        {
            get { return this._direction; }
            set { this._direction = value; }
        }
        /// <summary>
        /// Lat
        /// </summary>
        public double? Lat
        {
            get { return this._lat; }
            set { this._lat = value; }
        }
        /// <summary>
        /// Lon
        /// </summary>
        public double? Lon
        {
            get { return this._lon; }
            set { this._lon = value; }
        }
        /// <summary>
        /// Speed
        /// </summary>
        public double? Speed
        {
            get { return this._speed; }
            set { this._speed = value; }
        }
        /// <summary>
        /// Time
        /// </summary>
        public double? Time
        {
            get { return this._time; }
            set { this._time = value; }
        }
        /// <summary>
        /// Type
        /// </summary>
        public string Type
        {
            get { return this._type; }
            set { this._type = value; }
        }
        /// <summary>
        /// file
        /// </summary>
        public string File
        {
            get { return this._file; }
            set { this._file = value; }
        }
        
        /// <summary>
        /// 对比两个ZIptGPS1数据模型对象是否一致
        /// </summary>
        /// <param name="obj">要进行比对的ZIptGPS1数据模型对象</param>
        /// <returns>返回是否一致，为true一致，为false不一致</returns>
        public override bool Equals(object obj)
        {
            //判断传入对象是否为null
            if (obj == null) return false;
            //将传入对象转换成ZIptGPS1数据模型对象
            ZIptGPS1Mod zIptGPS1Mod = obj as ZIptGPS1Mod;
            //判断是否转换成功
            if (zIptGPS1Mod == null) return false;
            //进行匹配属性的值
            return
                //判断Direction是否一致
                this.Direction == zIptGPS1Mod.Direction &&
                //判断Lat是否一致
                this.Lat == zIptGPS1Mod.Lat &&
                //判断Lon是否一致
                this.Lon == zIptGPS1Mod.Lon &&
                //判断Speed是否一致
                this.Speed == zIptGPS1Mod.Speed &&
                //判断Time是否一致
                this.Time == zIptGPS1Mod.Time &&
                //判断Type是否一致
                this.Type == zIptGPS1Mod.Type &&
                //判断file是否一致
                this.File == zIptGPS1Mod.File;
        }
        /// <summary>
        /// 将当前ZIptGPS1数据模型对象转换成哈希码
        /// </summary>
        /// <returns>哈希值</returns>
        public override int GetHashCode()
        {
            //将ZIptGPS1数据模型对象的属性进行按位异或运算处理得到哈希码并返回
            return
                //将Direction进行按位异或运算处理
                (this.Direction == null ? 2147483647 : this.Direction.GetHashCode()) ^
                //将Lat进行按位异或运算处理
                (this.Lat == null ? 2147483647 : this.Lat.GetHashCode()) ^
                //将Lon进行按位异或运算处理
                (this.Lon == null ? 2147483647 : this.Lon.GetHashCode()) ^
                //将Speed进行按位异或运算处理
                (this.Speed == null ? 2147483647 : this.Speed.GetHashCode()) ^
                //将Time进行按位异或运算处理
                (this.Time == null ? 2147483647 : this.Time.GetHashCode()) ^
                //将Type进行按位异或运算处理
                (this.Type == null ? 2147483647 : this.Type.GetHashCode()) ^
                //将file进行按位异或运算处理
                (this.File == null ? 2147483647 : this.File.GetHashCode());
        }
        /// <summary>
        /// 将当前ZIptGPS1数据模型对象转换成字符串副本【仅显示在SQL中不能为空的列】
        /// </summary>
        /// <returns>字符串形式副本</returns>
        public override string ToString()
        {
            //将当前ZIptGPS1数据模型对象转换成字符串副本
            return
                "[" +
                "]";
        }
    }
}
